<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #wrap{
            width: 500px;
            height: 200px;
            border: 1px solid;
            position: absolute;
            left:0;
            right:0;
            top:0;
            bottom:0;
            margin: auto;

            display: flex;
        }
        #wrap div{
            height: 50px;
            text-align: center;
            line-height: 50px;
            background: pink;
            color: white;
            border: 1px solid black;
            box-sizing: border-box;

            /*弹性空间管理*/
            /*flex-grow: 1;
            flex-basis: 0%;*/
            /*flex: 1;*/
        }
    </style>
</head>
<body>
<!--容器-->
<div id="wrap">
    <!--项目-->
    <div style="flex: 1;">1</div>
    <div style="flex: 2;">2</div>
    <div style="flex: 3;">3</div>
    <div style="flex: 4;">4</div>
    <div style="flex: 5;">5</div>
</div>
</body>
</html>